<?php
defined('_JEXEC') or die('Restricted access');
class TableEdit extends JTable{
	var $id = null;
	var $product_id = null; 
	var $auction_date = null;
	var $currentprice = null;
	var $winprice = null;
	var $winid = null;
	var $published = null;
	var $closed = null;
	
	function __construct(&$db){
		parent::__construct('#__auction', 'id', $db);
	}

	function check()
	{
		if(empty($this->product_id)) {
			$this->setError(JText::_('Auction must have a product'));
			return false;
		}

		if(empty($this->auction_date)) {
			$this->setError(JText::_('Auction must have the time'));
			return false;
		}
		
		return true;
	}
	
}
?>
